import Vue from 'vue'
import VueRouter from 'vue-router'
import Users from '../views/Users'
import UserAdd from '../views/Users/UserAdd'

Vue.use(VueRouter)

export default new VueRouter({
  mode: 'history',
  routes: [
    { name: 'Users', path: '/users', component: Users },
    { name: 'UserAdd', path: '/users/add', component: UserAdd },
    { name: 'UserUpdate', path: '/users/update', component: UserAdd },
    { path: '*', redirect: '/users' },
  ],
})
